package com.wecon.dianping.service;

import com.wecon.dianping.common.BusinessException;
import com.wecon.dianping.model.Category;

import java.util.List;

/**
 * @author Weikang  Wang
 * @program: com.wecon.dianping.service
 * @description: 品类管理服务层
 * @date 2020/3/17 16:22
 */
public interface CategoryService {

    /**
     * 创建品类
     *
     * @param category 品类
     * @return /
     */
    Category create(Category category) throws BusinessException;

    /**
     * 通过id获取品类
     *
     * @param id id
     * @return /
     */
    Category getCategory(Integer id);

    /**
     * 获取所有
     *
     * @return /
     */
    List<Category> selectAll();

    /**
     * 品类数量
     * @return /
     */
    Integer countAllCategory();


}
